package cn.zjgsu.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.zjgsu.domain.TbStudent;
import cn.zjgsu.domain.TbTask;
import cn.zjgsu.domain.TbTeacher;
import cn.zjgsu.domain.TbUser;
import cn.zjgsu.mapping.TbStudentMapper;
import cn.zjgsu.mapping.TbTaskMapper;
import cn.zjgsu.mapping.TbTeacherMapper;
import cn.zjgsu.mapping.TbUserMapper;
import cn.zjgsu.service.IStudentService;
import cn.zjgsu.service.ITaskService;
import cn.zjgsu.utils.SHA1;


@Service
public class TaskServiceImpl implements ITaskService{

	@Autowired
	private TbStudentMapper studentMapper;
	@Autowired
	private TbUserMapper userMapper;
	@Autowired
	private TbTaskMapper taskMapper;
	
	
	
	//添加个人日历
	@Override
	public void addTask(TbTask task) {
		if(task!=null){
	
		taskMapper.insertSelective(task);
				}
			}



	@Override
	public void deleteTask(int pkTask) {
		
		taskMapper.deleteByPrimaryKey((long)pkTask);
	}



	@Override
	public List<TbTask> findTask(Integer fkUser) {
		
		
		List<TbTask> taskList= taskMapper.getTaskList((long)fkUser);
		return taskList;
	}
	}




